home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20020314-20021006
/
000076_fdc@columbia.edu_Thu May 16 15:07:24 EDT 2002.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
3KB
|
64 lines
Article: 13370 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
From: fdc@columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Ask with timeout? Input? help!
Date: 16 May 2002 15:07:14 -0400
Organization: Columbia University
Lines: 47
Message-ID: <ac1012$reu$1@watsol.cc.columbia.edu>
References: <cce7eu8eesu89jdlaoalmb6flbag71h9dg@4ax.com>
NNTP-Posting-Host: watsol.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1021576036 10078 128.59.39.139 (16 May 2002 19:07:16 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 16 May 2002 19:07:16 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13370
In article <cce7eu8eesu89jdlaoalmb6flbag71h9dg@4ax.com>,
dgk <sonicechoesWithNoSpam@hotmail.com> wrote:
: I'm trying to write a script to answer a modem and send and receive
: files. Pretty simple stuff. It will be running on a PC using Kermit95.
: I'm pretty much just using the existing hostmode.ksc and hostmdm.ksc
: and simplifying them a bit to get rid of the menus and just answer the
: phone and connect. Then I want to ask for a username and password,
: select a directory based on that, and send and receive files. I want
: to be the host.
:
: I am confused over a lot of stuff, but particularly ASK and INPUT. The
: documentation says that ASK reads input from the keyboard and INPUT
: appears to be used for remote sessions, so I guess I need to use
: input.
:
Right.
: But that is looking for specific input, not just reading into a
: variable. I guess I can examine the \vbuffer or whatever it is to see
: what actually came in, but I think I'm missing something here.
:
INPUT can be made to work approximately like ASK as follows:
clear input
output { Prompt: }
minput xx {\10} {\13}
if fail ...
Replace "Prompt:" with whatever you want the prompt to be, replace xx
with the number of seconds you want to wait, and then code the IF FAIL
command to do whatever you want if the INPUT times out.
If the INPUT succeeds, the \v(input) variable contains what the user
typed. However, it's still not exactly like ASK because (a) the terminating
carriage return or linefeed is included in the result, and (b) so are any
editing characters, like Delete or Backspace. You'll note that the hostmode
script includes a function that takes care of this.
: Is there a timeout that works with ASK?
:
Yes; for info see "help set ask-timer".
: Does ASK work with a serial connection?
:
No, you'll have to use the method described above.
- Frank